import request from '@/utils/request'

// 查询客服消息列表
export function listOnline(query) {
  return request({
    url: '/camp/online/list',
    method: 'get',
    params: query
  })
}

// 查询客服消息详细
export function getOnline(messageId) {
  return request({
    url: '/camp/online/' + messageId,
    method: 'get'
  })
}

// 新增客服消息
export function addOnline(data) {
  return request({
    url: '/camp/online',
    method: 'post',
    data: data
  })
}

// 修改客服消息
export function updateOnline(data) {
  return request({
    url: '/camp/online',
    method: 'put',
    data: data
  })
}

// 删除客服消息
export function delOnline(messageId) {
  return request({
    url: '/camp/online/' + messageId,
    method: 'delete'
  })
}
